<?php

namespace forfun\exception;

use restphp\exception\RestException;

class ForFunException extends RestException {
    public function __construct($strBaCode, $intHttpStatus = 400, $arrGroupArgs = array()) {
        parent::__construct("[" . $strBaCode . "]", APP_NAME . "/" . $strBaCode, $intHttpStatus, $arrGroupArgs);
    }

    public static function throwRuntimeException($strBaCode, $arrArgs = array(), $intHttpStatus = 400) {
        throw new ForFunException($strBaCode, $intHttpStatus, $arrArgs);
    }
}